UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'T8VCG0RZyFgJv8TZpz/+DaGF2IuD5SvDbcl/pb+kjpI='
WHERE
key_id = '879001a5afdbf3050f63c6c50432fd8e2049e6392ebfd11bdb0b2781d05620fe'
AND (
token = 'T8VCG0RZyFgJv8TZpz/+DaGF2IuD5SvDbcl/pb+kjpI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)