UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4e4FEQyYOjN3sUuQ470k4VoLqs5YDJ8Xdv+TsX8TxuE='
WHERE
key_id = '6b724befedbf065246f7a5f0f924933cbcccea0171d612b619eba5e579c0957a'
AND (
token = '4e4FEQyYOjN3sUuQ470k4VoLqs5YDJ8Xdv+TsX8TxuE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)