UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '++0FzxeWbdElCCXb9L5Xm5YLOmY5yw94RpvBIJvLVtI='
WHERE
key_id = '70ecd0c77f05a0481d61b807a9c7ec515c35e4ba3f4a9603962d1195385ca939'
AND (
token = '++0FzxeWbdElCCXb9L5Xm5YLOmY5yw94RpvBIJvLVtI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)