UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1X/kHI/yflCIewN5aksEbeIO21gbSqaRZrz6F6KXoQo='
WHERE
key_id = 'c8c694ed9c9f18f25127be7d8db182734aa6b070d326ea2d5851503641aa66d3'
AND (
token = '1X/kHI/yflCIewN5aksEbeIO21gbSqaRZrz6F6KXoQo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)