UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ezeeTyBF/QCYfnmbyrI2Az/wEj1TL/slyNR5IgV1Nuk='
WHERE
key_id = '592dc09a8eafcd6149e584004c07af85a24e9a660e8d820b216e4de1611dbf69'
AND (
token = 'ezeeTyBF/QCYfnmbyrI2Az/wEj1TL/slyNR5IgV1Nuk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)