UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vZMVexbyobOK/Bv5L1nNVLg64IoMTXb/syKbg48ez54='
WHERE
key_id = '909fe715dc880e32ec6c72d952de5db007417aa698b36774d03440a79303e65a'
AND (
token = 'vZMVexbyobOK/Bv5L1nNVLg64IoMTXb/syKbg48ez54='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)