UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RqlMzbTO91LZoemod8qhjzqCAm90uuhFc/4cCR1goUo=' 
WHERE 
  key_id = '4dd8bdb441f0eb59b98f7dbbb22c90051aac284284ac1f3e4c409f0a072cff4f' 
  AND (
    token = 'RqlMzbTO91LZoemod8qhjzqCAm90uuhFc/4cCR1goUo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028