UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '11Ch3KkEcNMEMuYjEypADZZ1G6p16nsRUwVozV/9ddI=' 
WHERE 
  key_id = '5e6c93b76cce73192336d6f53a1ec89b60ad051a82a66fb3271ddcbf39adb64a' 
  AND (
    token = '11Ch3KkEcNMEMuYjEypADZZ1G6p16nsRUwVozV/9ddI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022