UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0v2HWGek0fq9oQYTi81aJjcI2OYHq7lZsEhJHrgl/yc='
WHERE
key_id = '58b0a2c33a5fe46f6cae4908727882809dc36f1771f6a0b1f7aad80e3d713f75'
AND (
token = '0v2HWGek0fq9oQYTi81aJjcI2OYHq7lZsEhJHrgl/yc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)