UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VA2F2IZVDMHNCQES0102ZJ76fmUrsLqt9kK0exCknEw=' 
WHERE 
  key_id = '6e3f7cab1026f0db4b4cc3e52720d88659f609ced2b4d59e99037fb2b3634857' 
  AND (
    token = 'VA2F2IZVDMHNCQES0102ZJ76fmUrsLqt9kK0exCknEw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030