UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Kkp8/aSm9D/iMUOdsLCD5PT44dtYYiWmnST4ReUKXDQ=' 
WHERE 
  key_id = '0ebb5cbdda0ae9a699ebcff5a3f942084cd5dacf7077eb880751dd2718f28158' 
  AND (
    token = 'Kkp8/aSm9D/iMUOdsLCD5PT44dtYYiWmnST4ReUKXDQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022