UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/1HDEUp0YzQtX4S2YS1a8K2oLkil2Nl5xdeyvVbvPIk=' 
WHERE 
  key_id = 'bfdc845de4d31b93bd05462de612a03a985db9c70bcdb32d06c4a4875cd1651a' 
  AND (
    token = '/1HDEUp0YzQtX4S2YS1a8K2oLkil2Nl5xdeyvVbvPIk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00060