UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PhmycjzyM4UPAjqiFHCnPcl3DPAuXFOKK93TKR5u1fY=' 
WHERE 
  key_id = '455b97c812a975087e45e2410e4dc09ed9f554857caaa66e1e7a44ea96c86fc2' 
  AND (
    token = 'PhmycjzyM4UPAjqiFHCnPcl3DPAuXFOKK93TKR5u1fY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018