UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '13SKD/7U1CJCmo2JrtUS8oqaMlb3cQFkSEfzOUWNVoQ=' 
WHERE 
  key_id = 'dce5dbbf6ba61d886e92c3e1fce364a5abc5e276a3398151e21f2ac3eaaf3ac7' 
  AND (
    token = '13SKD/7U1CJCmo2JrtUS8oqaMlb3cQFkSEfzOUWNVoQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00059