UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'W0NS6JfhFnEfbstqtbEqV7rh2t1j/e5VcKmEgAonFBw=' 
WHERE 
  key_id = '276aa15776b866aa47d47f9ae0ec9dbb424da8706229918a1292d38eca933bb0' 
  AND (
    token = 'W0NS6JfhFnEfbstqtbEqV7rh2t1j/e5VcKmEgAonFBw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027