UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kebiM/+QYyewMWrPjk836E8uwf24RNe2qwHY86hJkR4='
WHERE
key_id = '92b779d1629e3f6f6019662afc68689184823104f5f900f313baf9ed0ee57e82'
AND (
token = 'kebiM/+QYyewMWrPjk836E8uwf24RNe2qwHY86hJkR4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)