UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '63AsNJdH1x0vDGikyQo9/63SZ9CUCJUFayj+2+eyEXw='
WHERE
key_id = '8356a2cec6f19158aac7d6bd20e2f14fcf0e638523d9f0291d9ad3d91c02a46c'
AND (
token = '63AsNJdH1x0vDGikyQo9/63SZ9CUCJUFayj+2+eyEXw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)