UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eppCBL3hv/9+FRKKurp0A9Wh/2yjBNUQZeJXa0QivbY='
WHERE
key_id = '099253941e6be7f7e22ddc197caa83c72f0505b7789760fe767da5b023d52c36'
AND (
token = 'eppCBL3hv/9+FRKKurp0A9Wh/2yjBNUQZeJXa0QivbY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)