UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZXqdd5GIXDXu9W+MVL5r5XR/aJhA/JyvFb4v4uzg5/E='
WHERE
key_id = '5e09604df093d72e5b7ca3cafb5890b3f85fe987c1c74cfca782a12b40c8c963'
AND (
token = 'ZXqdd5GIXDXu9W+MVL5r5XR/aJhA/JyvFb4v4uzg5/E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)