UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xexnkVMRzrzLk6FHVc7dWBb5qYK7bu1P3zgliQJ1JTs=' 
WHERE 
  key_id = '4b401a8ff559afbdc7cec8161dd220d89349de7991d2faa286eb3b2ff726c3dd' 
  AND (
    token = 'xexnkVMRzrzLk6FHVc7dWBb5qYK7bu1P3zgliQJ1JTs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035