UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7tYVkYZAWPlqnzDvTk/qjFSfqRdw8Cc//gjfVGox4ZQ=' 
WHERE 
  key_id = '7b4ba11ce06f3cac0fb85c6a38cc3aba2f135c63655c863a061d87efd5b1ff5b' 
  AND (
    token = '7tYVkYZAWPlqnzDvTk/qjFSfqRdw8Cc//gjfVGox4ZQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023