UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RkWY4a88g9NFsgxxDeacD/9C1gXkvxAlhR1JSJHKp5M='
WHERE
key_id = '72f9fbdb0d1f7a49cfccab8bb7830e4e6698b971206ff2487b0ee6a79f7ebb60'
AND (
token = 'RkWY4a88g9NFsgxxDeacD/9C1gXkvxAlhR1JSJHKp5M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)