UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zsGaP6xnZsdgsklPYDvenfPCNzZI9vrLMID9K9QvqQM='
WHERE
key_id = '44cd13c95c4da130aeba0b746f8ce9809507de52b17b67301134a4da3653212d'
AND (
token = 'zsGaP6xnZsdgsklPYDvenfPCNzZI9vrLMID9K9QvqQM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)