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