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