UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+axm89GCZBXWCBJO1dkL9AN2aQwB0kEo8QH/+HPWWRs=' 
WHERE 
  key_id = '62f0111b23aeca46ef737bf6a1e784d6526b86f5b70d1e130f93c180dffcd959' 
  AND (
    token = '+axm89GCZBXWCBJO1dkL9AN2aQwB0kEo8QH/+HPWWRs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018