UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mJEI6Qc348fYInOnyXYLsIPI+jI/das9M52z+VjV3/E=' 
WHERE 
  key_id = '94ea546c1ba948745c5d5134047abcf388092acea45b3382cb54b072ac5ede24' 
  AND (
    token = 'mJEI6Qc348fYInOnyXYLsIPI+jI/das9M52z+VjV3/E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033