UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jjqqryeh6l0fv7nDEghoIJO7sPdk+K/0IiiUxIACq2I='
WHERE
key_id = 'b03753b2b1dfc0319eb043c78607a99bd5220cf242a5b6a0c4d5dc6eebf38953'
AND (
token = 'jjqqryeh6l0fv7nDEghoIJO7sPdk+K/0IiiUxIACq2I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)