UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2d1XcbjxpPrAUdiciSPGWtyz0MvBN1Z9hHFjl/RxJZo='
WHERE
key_id = '035d6d47d8611c6d858c2e7137aaf6863fa2b612771a55f6ac3cd80370ceca58'
AND (
token = '2d1XcbjxpPrAUdiciSPGWtyz0MvBN1Z9hHFjl/RxJZo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)