UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rvUsKHv4t4Hnrwbzykhq4IOp3hoGLF3ClTkOdSKh8WQ='
WHERE
key_id = '9099f356f6236a2530546d5ee6af8ca64bdb08f8cc4e5131af3aea77da13c8f9'
AND (
token = 'rvUsKHv4t4Hnrwbzykhq4IOp3hoGLF3ClTkOdSKh8WQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)