UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tjgfYZhmHottonbze595lFW4KQ61I23b4xz1ECSp/Tk=' 
WHERE 
  key_id = 'bc196db35390763f3e0e80638c8c8da42f26ffa1e8fb0d7b4298279ee0f06d15' 
  AND (
    token = 'tjgfYZhmHottonbze595lFW4KQ61I23b4xz1ECSp/Tk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055