UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0OxYKHkni/zPKAFVETUH5GaMTaosJ5eZh/0nyU9Rmbs=' 
WHERE 
  key_id = 'ac711a085d260b7002c01c57d17efac28b0fc5a073f60385ef0d66f24ee1d6bb' 
  AND (
    token = '0OxYKHkni/zPKAFVETUH5GaMTaosJ5eZh/0nyU9Rmbs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033