UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UvyATUIYKlZhbo6twlKr8WRQ4NRaLU2QWwk04XPbl0E=' 
WHERE 
  key_id = 'e66aab1c28fba9a9f2d76a5b18f88b1b493ed8db5b9c82bfd77723a1768d7fd7' 
  AND (
    token = 'UvyATUIYKlZhbo6twlKr8WRQ4NRaLU2QWwk04XPbl0E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034