UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/FDXFaVw/8WNMMxwqmvdAsAlirz6YQkw1JLNJkZtfoQ='
WHERE
key_id = '80b444ba26a321c025c77c3259efa468d9f3b703d965d54958abdb4326416422'
AND (
token = '/FDXFaVw/8WNMMxwqmvdAsAlirz6YQkw1JLNJkZtfoQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)