UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+IHaLA643R7cGdLYJyhSfXYD/xOVfWdOezCJysVQLq0='
WHERE
key_id = '713be2c6013d7c61ee35deeb45318a0efddb7ac17afaf5db84967b72e9e39295'
AND (
token = '+IHaLA643R7cGdLYJyhSfXYD/xOVfWdOezCJysVQLq0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)