UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '59NIjGVvORQItCrYW+k0Q4nLTcyT5iHdCGFYNhbK6fU='
WHERE
key_id = '7473e32c56a1c4a3bbae6cc668723bec01e99ceb1d6efc71aab6d00135462128'
AND (
token = '59NIjGVvORQItCrYW+k0Q4nLTcyT5iHdCGFYNhbK6fU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)