UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y0Oy/ZhDTCn6AmNJP0XN/08gOaE4mxGezQp5wVN6Qok='
WHERE
key_id = '452cb54f15924dbc0bf4741c6e93d5344cf7bbe148b27fdc17be5c92512c26aa'
AND (
token = 'y0Oy/ZhDTCn6AmNJP0XN/08gOaE4mxGezQp5wVN6Qok='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)