UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8UiueRLnRsoXeUbfR51mNdvmkAh0oEZNeKlKB/eGLaA='
WHERE
key_id = '96c1779672f8a682634fe1de52cf5753b30ff0ea51a0a698f0ee00c5a2f8249c'
AND (
token = '8UiueRLnRsoXeUbfR51mNdvmkAh0oEZNeKlKB/eGLaA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)