UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Eik0Z4zc+PuDRtsKJYtnUMFC5GT9O5qgcwlpLl+O5Kw=' 
WHERE 
  key_id = 'e99e8e92a624de317f4f973f66f8ac4d6c4965499704020a18c44a0015fec8fa' 
  AND (
    token = 'Eik0Z4zc+PuDRtsKJYtnUMFC5GT9O5qgcwlpLl+O5Kw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031