UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VkgGHVLJrLx2pbhhf+dM35K5LeTKbpmfo7wkv+c4KF8='
WHERE
key_id = '75ad9d96c3b2cae4e9e4d8b8414fa6c55bc4856d1b273808b05ee6134df1e3a8'
AND (
token = 'VkgGHVLJrLx2pbhhf+dM35K5LeTKbpmfo7wkv+c4KF8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)