UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fr1ZhuTba5rm8AbqEc5EzwK5W/V5pxk9+Gk5j0I9iMM='
WHERE
key_id = '08d3fdc98218f1105cc0d48e6c1a339b395e86d851da26b94f79e19b353b21b6'
AND (
token = 'Fr1ZhuTba5rm8AbqEc5EzwK5W/V5pxk9+Gk5j0I9iMM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)