UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SYSdycwwsXD9WcyTZuzeF07aUv2LG54x7XJd+DVKdqw=' 
WHERE 
  key_id = '84378d4b8d2f4ef8dfaee01da72336e4ec7fe967371ff34128dcdd42f61230fd' 
  AND (
    token = 'SYSdycwwsXD9WcyTZuzeF07aUv2LG54x7XJd+DVKdqw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00057