UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'D++RWQUYfhEecfK9uIWFcLCEBowD0NOvyvdGZdnorC4='
WHERE
key_id = '08eeafef4b66c711202834220e237717a5ccea826ced664cf09296f0b86e5712'
AND (
token = 'D++RWQUYfhEecfK9uIWFcLCEBowD0NOvyvdGZdnorC4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)