UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'K3b42tjMq+xglmCOxSPiHNm7sDBKQ3m4/1ZvLXaVvLc='
WHERE
key_id = '994489d8d241fc3f4c54561ec34f39f2dab0bdebb6b4305db850f71e5715ec7a'
AND (
token = 'K3b42tjMq+xglmCOxSPiHNm7sDBKQ3m4/1ZvLXaVvLc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)