UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U/DlLW3xoa7JVrfPXA1v5fAzY5a3QLXeLLwwiQ8MvSI='
WHERE
key_id = '18010870957e0d9436086fd1c625ed8d8fd48446cb5ab5d672b219ad7907ace6'
AND (
token = 'U/DlLW3xoa7JVrfPXA1v5fAzY5a3QLXeLLwwiQ8MvSI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)