UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nzmhhDFbpzo44Yv/M9QVMA4YnmzPNY2HTkqFO7/CMvs='
WHERE
key_id = '5764c6c3fe3785a1a49f2d3155b594e6d8c1c4bfc5461e7137c2ef7c8338b9da'
AND (
token = 'nzmhhDFbpzo44Yv/M9QVMA4YnmzPNY2HTkqFO7/CMvs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)