UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bGDCVywVs3VUJd3X/4r+bDwFw4tIW1iQFJvpVvaoH1w='
WHERE
key_id = '2ecd22323c0401703d67dff8afa00e7acf3ba3fb8a6f764ffcc032bceba7e733'
AND (
token = 'bGDCVywVs3VUJd3X/4r+bDwFw4tIW1iQFJvpVvaoH1w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)