UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E2b5AKJdomDLErkigGx6eQf1Ljj+JWDIVjUhx1uuQgk='
WHERE
key_id = 'b07f990a0ceea006968cd114e55019b04597a442bfbacb79a4e842574824f737'
AND (
token = 'E2b5AKJdomDLErkigGx6eQf1Ljj+JWDIVjUhx1uuQgk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)